Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@soinlabs/sybase
Advanced tools
This library provides a Node.js bridge to connect to a Sybase database. It uses a Java bridge to facilitate the connection and query execution.
This library provides a Node.js bridge to connect to a Sybase database. It uses a Java bridge to facilitate the connection and query execution.
npm install @soinlabs/sybase
const Sybase = require('@soinlabs/sybase');
const sybase = new Sybase({
host: 'localhost',
port: 5000,
database: 'sybase',
username: 'username',
password: 'password',
encoding: 'utf8',
pathToJavaBridge: '/path/to/JavaSybaseLink.jar', // Optional
logTiming: true, //Logs on JAR side
logs: true //Logs on Node.js side
});
connect()
sybase.connect((err, data) => {
if (err) {
console.error(err);
return;
}
console.log('Connected:', data);
});
connectAsync()
const data = await sybase.connectAsync();
console.log('Connected:', data);
query(sqlQuery)
sybase.query('SELECT * FROM users', (err, result) => {
if (err) {
console.error(err);
return;
}
console.log('Result:', result);
});
querySync(sqlQuery)
const result = await sybase.querySync('SELECT * FROM users');
console.log('Result:', result);
disconnect()
sybase.disconnect();
disconnectSync()
The disconnectSync
method allows you to disconnect synchronously from the database and terminates the associated Java process
const sybase = new Sybase(...);
await sybase.disconnectSync();
isConnected()
const isConnected = sybase.isConnected();
console.log(`Is connected: ${isConnected}`);
transaction(queriesFunction)
Executes a series of queries within a transaction. If any of the queries fail, the transaction will be rolled back.
async function main() {
try {
const result = await sybase.transaction(async (connection) => {
const user = await connection.querySync('SELECT * FROM users WHERE id = 1');
await connection.querySync(`UPDATE users SET name = 'John' WHERE id = 1`);
return user;
});
console.log('Transaction successful, result:', result);
} catch (err) {
console.error('Transaction failed:', err);
}
}
main();
FAQs
This library provides a Node.js bridge to connect to a Sybase database. It uses a Java bridge to facilitate the connection and query execution.
The npm package @soinlabs/sybase receives a total of 64 weekly downloads. As such, @soinlabs/sybase popularity was classified as not popular.
We found that @soinlabs/sybase demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.